import request from '@/utils/request'
const preUrl = '/shop'
export default {
    pageShop(query) {
        return request({
            url: preUrl + `/pageShop`,
            method: 'post',
            data: query
        })
    },
    getShopById(id){
        return request({
            url: preUrl + `/getShop/${id}`,
            method: 'get',
        })
    },
    getAll(){
        return request({
            url: preUrl + `/getAll`,
            method: 'get',
        })
    },
    gets(ids){
        return request({
            url: preUrl + `/getShops`,
            method: 'post',
            data: ids
        })
    },
    add(shop){
        return request({
            url: preUrl + `/addShop`,
            method: 'post',
            data: shop
        })
    },
    update(shop){
        return request({
            url: preUrl + `/updateShop`,
            method: 'post',
            data: shop
        })
    },
    delete(id){
        return request({
            url: preUrl + `/deleteShop`,
            method: 'post',
            data: id
        })
    },
    deletes(ids){
        return request({
            url: preUrl + `/deleteShops`,
            method: 'delete',
            data: ids
        })
    }
}
